package com.book.service.impl;

import com.book.dao.BookMapper;
import com.book.pojo.Book;
import com.book.service.BookService;

import java.util.List;

/**
 * author:rengl
 * 2023-04-08 08:42
 */
public class BookServiceImpl implements BookService {
    private BookMapper bookMapper = new BookMapper();
    @Override
    public Integer add(Book book) {
        return bookMapper.add(book);
    }

    @Override
    public List<Book> findAll() {
        return bookMapper.findAll();
    }

    @Override
    public Book findOne(Integer id) {
        return bookMapper.findOne(id);
    }

    @Override
    public Integer update(Book updatebook) {
        return bookMapper.update(updatebook);
    }

    @Override
    public Integer delete(Integer id) {
        return bookMapper.delete(id);
    }
}
